﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

using Rison.Web.Common;
using Rison.BusinessFacade.Common;
using Rison.BusinessFacade.Entity.XT;
using Rison.BusinessFacade.Facade.XT;
using Rison.BusinessFacade.Entity.Biz;
using Rison.BusinessFacade.Facade.Biz;
using Rison.BusinessFacade.Helper;

namespace Rison.Web.admin
{
    public partial class InfosView : PageDataViewBase
    {
        protected void Page_Init(object sender, EventArgs e)
        {
            base.dataView = this.gvData;
            base.addButton = this.btnAppend;
            base.deleteButton = this.btnDelete;
            base.pnlConditions = this.pnlCondition;
            base.labMessage = this.labMsg;
            base.baseFacade = new InfomationFacade();
            base.hidCurrentPageIndex = this.hidCurPageIndex;
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(this.labMsg.Text)) labMsg.Text = string.Empty;

            if (!this.IsPostBack)
            {
                BindData();
            }
        }   

        protected override void InitConditions()
        {
            this.drpCategory.DataSource = null;
            this.drpCategory.DataValueField = "CID";
            this.drpCategory.DataTextField = "cName";
            this.drpCategory.DataBind();
            this.drpCategory.DataValueField = "Biz_Infomation.Category";

            this.drpCategory.Items.Add(new ListItem("公告", "1"));
        }

        protected override void btnAppend_Click(object sender, EventArgs e)
        {
            Response.Redirect("InfomationEdit.aspx?category=" + drpCategory.SelectedValue);
        }


    }
}
